{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2><a href="{if isset($smarty.session.ecmtpost.prefer)}{$smarty.session.ecmtpost.prefer}{else}{$prefer}{/if}">Đánh giá - Bình luận</a> &raquo; Cập nhật</h2></div>
                    <div class="secData">
                    	<form name="frmEdit" id="frmEdit" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}education/cmtes">
                        	<input type="hidden" name="pcmtid" id="pcmtid" value="{$arrCmt.ecmtid}" />
                            <input type="hidden" name="prefer" id="prefer" value="{if isset($smarty.session.ecmtpost.prefer)}{$smarty.session.ecmtpost.prefer}{else}{$strRefer}{/if}" />
                        	{if isset($smarty.session.ecmterr)}
                            	<div class="userInput">
                                    <span class="errorMessage">{$smarty.session.ecmterr}</span>
                                </div>
                            {/if}
                            <div class="userInput">
                            	<label>Bởi:</label>
                                <strong><a href="javascript:;">{if $arrCmt.userid|ouser:"username" != ""}{$arrCmt.userid|ouser:"username"}{else}{$arrCmt.userid|ouser:"fullname"}{/if}</a></strong>
                            </div>  
                            <div class="userInput">
                            	<label for="ptitle">Tiêu đề:</label>
                                <input type="text" name="ptitle" id="ptitle" value="{if isset($smarty.session.ecmtpost.ptitle)}{$smarty.session.ecmtpost.ptitle|escape}{else}{$arrCmt.title|escape}{/if}" />
                            </div>  
                            <div class="userInput">
                            	<label>Nội dung:</label>
                                {if isset($smarty.session.ecmtpost.pcontent)}
                                    {"pcontent"|fck:$smarty.session.ecmtpost.pcontent:"Admin":"560":"400px"}
                                {else}
                                    {"pcontent"|fck:$arrCmt.content:"Admin":"560":"400px"}
                                {/if}
                            </div>                                                 
                            <div class="secAction">
                        		<input type="submit" value="Lưu dữ liệu"/>
                               	<input type="button" value="Hủy" onclick="document.location.href='{if isset($smarty.session.ecmtpost.prefer)}{$smarty.session.ecmtpost.prefer}{else}{$strRefer}{/if}'"/>
                            </div>
                        </form>                    	
                   	</div>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
